﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VO;
namespace DAL
{
    class KhachHang_DAO:SqlDataProvider
    {
        #region[Customer_Insert_Up]
        public bool Customer_Insert_Up(KhachHang_OBJ _KhachHangOBJ)
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_Ins_Up_KhachHang", GetConnection()))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbCmd.Parameters.Add(new SqlParameter("@option", _KhachHangOBJ.Option));
                dbCmd.Parameters.Add(new SqlParameter("@HoTen",_KhachHangOBJ.HoTen));
                dbCmd.Parameters.Add(new SqlParameter("@GioiTinh",_KhachHangOBJ.GioiTinh));
                dbCmd.Parameters.Add(new SqlParameter("@DiaChi",_KhachHangOBJ.DiaChi));
                dbCmd.Parameters.Add(new SqlParameter("@DienThoai",_KhachHangOBJ.DienThoai));
                dbCmd.Parameters.Add(new SqlParameter("@GhiChu",_KhachHangOBJ.GhiChu));
                dbCmd.Parameters.Add(new SqlParameter("@Id",_KhachHangOBJ.MaKhachHang));
                dbCmd.ExecuteNonQuery();
            }
            return true;
        }
        #endregion
    }
}
